#ifndef MANAGER_H
#define MANAGER_H

#include "DeviceManager/DeviceManagerClient.h"
#include "WifiManager/WifiManager.h"
#include "MqttClient/MqttClient.h"
#include "freertos/task.h"

typedef struct ManageModule
{
    DeviceManagerClient *deviceManagerClient;
    WifiManager *wifiManager;
    MqttClient *mqttClient;
   
    QueueHandle_t wifiConfigQueue;  // 定义一个 Wi-Fi 配置信息队列 用于传递新的 Wi-Fi 配置
    SemaphoreHandle_t wifiConnectMutex;// 用于同步 Wi-Fi 连接操作的互斥量
    TaskHandle_t wifi_config_task_handle;

    QueueHandle_t mqttConfigQueue;  // 定义一个 mqtt 配置信息队列 用于传递新的 mqtt 配置
    SemaphoreHandle_t mqttConnectMutex;// 用于同步 mqtt 连接操作的互斥量
    TaskHandle_t mqtt_task_handle;

    TaskHandle_t device_client_task_handle;
} ManageModule;

extern ManageModule *manageModule; // 声明全局变量

#endif